export default {
  methods: {
    // 设置表头
    getTableColumns (arr) {
      const tableColumns = {
        selection: {
          type: 'selection',
          width: 60,
          align: 'center',
          fixed: 'left'
        },
        completeTime: {
          title: '完成日期',
          align: 'center',
          key: 'completeTime',
          minWidth: 190
        },
        payTime: {
          title: '支付日期',
          align: 'center',
          key: 'payTime',
          minWidth: 190
        },
        number: {
          title: '订单编号',
          align: 'center',
          key: 'number',
          minWidth: 150
        },
        orderName: {
          title: '订单名称',
          align: 'center',
          key: 'orderName',
          minWidth: 160
        },
        customerName: {
          title: '所属企业',
          align: 'center',
          key: 'customerName',
          minWidth: 170
        },
        commission: {
          title: '服务佣金',
          align: 'center',
          key: 'commission',
          minWidth: 100
        },
        receiptUserName: {
          title: '接单人员',
          align: 'center',
          key: 'receiptUserName',
          minWidth: 100
        },
        receiptUserIdCardNo: {
          title: '身份证号',
          align: 'center',
          key: 'receiptUserIdCardNo',
          minWidth: 170
        },
        receiptUserBankAccountNo: {
          title: '银行卡号',
          align: 'center',
          key: 'receiptUserBankAccountNo',
          minWidth: 150
        },
        orderPrice: {
          title: '获得收益',
          align: 'center',
          key: 'orderPrice',
          minWidth: 100
        },
        payStatus: {
          title: '支付状态',
          align: 'center',
          key: 'payStatus',
          minWidth: 100
        }
      }
      let data = []

      arr.forEach(col => data.push(tableColumns[col]))

      return data
    }
  }
}
